package com.aurora.spider.houyuantuan;

import com.geccocrawler.gecco.annotation.*;
import com.geccocrawler.gecco.request.HttpRequest;
import com.geccocrawler.gecco.spider.HtmlBean;
import org.neo4j.ogm.annotation.Id;
import org.neo4j.ogm.annotation.NodeEntity;
import org.neo4j.ogm.annotation.Property;

/**
 * Created by jackie on 18/1/15.
 */
@NodeEntity("Person")
@Gecco(matchUrl="https://www.houyuantuan.com/mingxing/{id}.html", pipelines={"personDealLine"})
public class Person implements HtmlBean {


    @Id
    @RequestParameter
    private Long id;

    @Property("imgUrl")
    @Image
    @HtmlField(cssPath="body > div.wrapper > div.container > div.outer > div.mod-info > div.avatar > img")
    private String imgUrl;

    @Request
    private HttpRequest request;
    /**
     * 名称
     */
    @Property("name")
    @Text
    @HtmlField(cssPath="body > div.wrapper > div.container > div.outer > div.mod-info > div.info > div > h1")
    private String name;
    /**
     * 个人信息
     */
    @Property("info")
    @Html
    @HtmlField(cssPath="body > div.wrapper > div.container > div.outer > div.mod-main > div.modules.archives > div")
    private String info;

    public HttpRequest getRequest() {
        return request;
    }

    public void setRequest(HttpRequest request) {
        this.request = request;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getInfo() {
        return info;
    }

    public void setInfo(String info) {
        this.info = info;
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getImgUrl() {
        return imgUrl;
    }

    public void setImgUrl(String imgUrl) {
        this.imgUrl = imgUrl;
    }

}
